package book;

/**
 * 书架
 *
 * @author dengjiangming
 * @version 1.0.0
 * @date 2025-06-11
 */
public class BookList {

    //利用数组存储图书信息
    private Book[] books = new Book[50];
    //用一个整型变量来记录当前存放的书的数目
    private int usedSize;

    public Book[] getBooks() {
        return books;
    }

    public void setBooks(Book[] books) {
        this.books = books;
    }

    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }

    //构造方法，默认放了三本书
    public BookList() {
        this.books[0] = new Book("三国演义","罗贯中",20,"小说");
        this.books[1] = new Book("西游记","吴承恩",25,"小说");
        this.books[2] = new Book("红楼梦","曹雪芹",34,"小说");

        this.usedSize = 3;

    }

}
